<?xml version="1.0" encoding="utf-8"?>
<rsp stat="<?php echo $stat ?>">
<?php if($stat == 'ok'): ?>
  <history page="<?php echo $page?>" perpage="<?php echo $perpage?>" pages="<?php echo $pages?>" total="<?php echo $total?>">
<?php include_partial('history_list', array('history' => $history)); ?>
  </history>
<?php else: ?>
  <err code="<?php echo $error_code ?>" msg="<?php echo $error_msg ?>" />
<?php endif; ?>
</rsp>